#pragma once
#include "TcpConnection.h"
using TcpConnectionPtr = shared_ptr<TcpConnection>;

class Task // 任务基类
{
public:
    virtual ~Task() = default;
    virtual void process() = 0;
};

class MyTask : public Task
{
public:
    MyTask(const std::string &msg, const TcpConnectionPtr &con);
    void process() override;

private:
    std::string _msg;
    TcpConnectionPtr _con;
};
